import axios from "axios";
const get = options => {
  return new Promise((resolve, reject) => {

    const defaultOptions = {};
    const newOptions = {
      ...defaultOptions,
      ...options
    };
    newOptions.headers = {
      ...newOptions.headers
    }; 
    axios.get(newOptions.url, {
      params: newOptions.data ,
      headers: newOptions.headers,
    }).then(res => {
      if(res){
		
        resolve(res.data);
      }

    }).catch(err => {
      if(err.response){
        if(err.response.status!='401'||err.response.status!='403'){
          reject(err);
        }
      }else{
        reject(err);
      }

    })

  });
};
export default get
